package com.wangyk.rabbitmqconsole.pojoProperties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @Description:
 * 使用properties的方式创建对象。
 * 1.导入相应的jar包。
 * 2.注意大小写。
 * @Author: wangyk
 * @CreateDate: 2018/8/14$ 11:09$
 * @UpdateUser: wangyk
 * @UpdateDate: 2018/8/14$ 11:09$
 * @UpdateRemark:
 * @Version: 1.0
 */
@Component
@ConfigurationProperties(prefix = "rootinfo")
@PropertySource("classpath:config/rootInfo.properties")
public class RootInfo
{
    private String name;

    private String pass;

    private int sex;

    private int age;

    private String phone;

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getPass()
    {
        return pass;
    }

    public void setPass(String pass)
    {
        this.pass = pass;
    }

    public int getSex()
    {
        return sex;
    }

    public void setSex(int sex)
    {
        this.sex = sex;
    }

    public int getAge()
    {
        return age;
    }

    public void setAge(int age)
    {
        this.age = age;
    }

    public String getPhone()
    {
        return phone;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }
}
